Database systems rely on statistics (e.g., number of rows in a table, number of distinct values in a column, and the like) to optimize queries (e.g., generate and select optimal access plans for executing queries). When statistics are missing or sale stale, less than optimal plans may be generated and selected.
Various approaches have been proposed to address the problem of missing or stale statistics and the effect on query optimization. Existing approaches, however, oftentimes only benefit future queries and do not benefit currently executing queries. In addition, approaches that can be used to benefit currently executing queries usually involve multiple optimization attempts (e.g., multiple calls to an optimizer), which is inefficient and expensive.